{if $config->force_title != ""}
<div class="textmodule">
    <div class="textmodule_title">
        <h3>{$config->force_title}</h3>
    </div>
</div>
{/if}
<table class="linktabs_tab our_team">
    <tr>
    {foreach name=links from=$links item=link}
        {math equation="x-1" x=$link->rank assign=prev}
        {math equation="x+1" x=$link->rank assign=next}
        
        {if ($smarty.foreach.links.index)%2 == 0}
            </tr>
            <tr>
        {/if}
        <td {if ($smarty.foreach.links.index)%2 == 0} style="padding-left: 0px; border-right: 1px solid #999;" {else} style="padding-right: 0px;"  {/if} >
            {permissions level=$smarty.const.UILEVEL_NORMAL}
                {if $permissions.edit == 1 || $permissions.delete == 1}
                <div class="itemactions">

                    {if $permissions.edit == 1}
                    <a href="{link action=edit id=$link->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" /></a>
                    {/if}
                    {if $permissions.delete == 1}
                    <a href="{link action=delete id=$link->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" onclick="return confirm('{$_TR.delete_link_confirm}');" /></a>
                    {/if}
                    {if $smarty.foreach.links.first == 0}
                    <a href="{link action=rank_switch a=$link->rank b=$prev id=$link->id}">            
                        <img src="{$smarty.const.ICON_RELATIVE}up.png" title="{$_TR.alt_previous}" alt="{$_TR.alt_previous}" />
                    </a>
                    {/if}
                    {if $smarty.foreach.links.last == 0}
                    <a href="{link action=rank_switch a=$next b=$link->rank id=$link->id}">
                        <img src="{$smarty.const.ICON_RELATIVE}down.png" title="{$_TR.alt_next}" alt="{$_TR.alt_next}" />
                    </a>
                    {/if}
                </div>
                {/if}
            {/permissions}
            <img class="thumb" src="/phpThumb.php?src={$link->picpath}&w=100" title="{$link->name}">
            <div class="lt_body_team">
                <div class="body_team">
                    <div class="team_name">{$link->name}</div>
                    <div class="team_position">{$link->description}</div>
                    <div class="team_email">{email_break email=$link->url}</div>
                    <div class="team_viewprofile_button"><a href="{link action=team_detail name=$link->seo_link}">{$_TR.ourteam_profile}</a></div>
                </div>
            </div>
        </td>
      {/foreach}  
    </tr>
</table>

<div align=center>{paging current_page=$page pages=$pages action=list module=linklistmodule page_length=4 src=$__loc->src}</div>

<div class="clear"></div>
<div class="actions" style="margin: 10px 0px 10px 15px; "> 
            {permissions level=$smarty.const.UILEVEL_NORMAL}
            {if $permissions.create == 1}
            <a class="add" href="{link action=manage}">Manage links</a>
            {/if}
            {/permissions}
            
</div>    